/* 
  处理#标志的tokens数组，结合renderTemplate实现递归
*/
import renderTemplate from './renderTemplate'

export default function parseTokens(tokens, data) {
  var resultStr = ''
  for (let i = 0; i < data.length; i++) {
    resultStr += renderTemplate(tokens, { ...data[i], '.': data[i] })
  }
  return resultStr
}
